package com.neusoft.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class BorrowInfoExample {
	protected String orderByClause;

	protected boolean distinct;

	protected List<Criteria> oredCriteria;

	public BorrowInfoExample() {
		oredCriteria = new ArrayList<Criteria>();
	}

	public void setOrderByClause(String orderByClause) {
		this.orderByClause = orderByClause;
	}

	public String getOrderByClause() {
		return orderByClause;
	}

	public void setDistinct(boolean distinct) {
		this.distinct = distinct;
	}

	public boolean isDistinct() {
		return distinct;
	}

	public List<Criteria> getOredCriteria() {
		return oredCriteria;
	}

	public void or(Criteria criteria) {
		oredCriteria.add(criteria);
	}

	public Criteria or() {
		Criteria criteria = createCriteriaInternal();
		oredCriteria.add(criteria);
		return criteria;
	}

	public Criteria createCriteria() {
		Criteria criteria = createCriteriaInternal();
		if (oredCriteria.size() == 0) {
			oredCriteria.add(criteria);
		}
		return criteria;
	}

	protected Criteria createCriteriaInternal() {
		Criteria criteria = new Criteria();
		return criteria;
	}

	public void clear() {
		oredCriteria.clear();
		orderByClause = null;
		distinct = false;
	}

	protected abstract static class GeneratedCriteria {
		protected List<Criterion> criteria;

		protected GeneratedCriteria() {
			super();
			criteria = new ArrayList<Criterion>();
		}

		public boolean isValid() {
			return criteria.size() > 0;
		}

		public List<Criterion> getAllCriteria() {
			return criteria;
		}

		public List<Criterion> getCriteria() {
			return criteria;
		}

		protected void addCriterion(String condition) {
			if (condition == null) {
				throw new RuntimeException("Value for condition cannot be null");
			}
			criteria.add(new Criterion(condition));
		}

		protected void addCriterion(String condition, Object value, String property) {
			if (value == null) {
				throw new RuntimeException("Value for " + property + " cannot be null");
			}
			criteria.add(new Criterion(condition, value));
		}

		protected void addCriterion(String condition, Object value1, Object value2, String property) {
			if (value1 == null || value2 == null) {
				throw new RuntimeException("Between values for " + property + " cannot be null");
			}
			criteria.add(new Criterion(condition, value1, value2));
		}

		protected void addCriterionForJDBCDate(String condition, Date value, String property) {
			if (value == null) {
				throw new RuntimeException("Value for " + property + " cannot be null");
			}
			addCriterion(condition, new java.sql.Date(value.getTime()), property);
		}

		protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
			if (values == null || values.size() == 0) {
				throw new RuntimeException("Value list for " + property + " cannot be null or empty");
			}
			List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
			Iterator<Date> iter = values.iterator();
			while (iter.hasNext()) {
				dateList.add(new java.sql.Date(iter.next().getTime()));
			}
			addCriterion(condition, dateList, property);
		}

		protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
			if (value1 == null || value2 == null) {
				throw new RuntimeException("Between values for " + property + " cannot be null");
			}
			addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
		}

		public Criteria andBcIdIsNull() {
			addCriterion("bc_id is null");
			return (Criteria) this;
		}

		public Criteria andBcIdIsNotNull() {
			addCriterion("bc_id is not null");
			return (Criteria) this;
		}

		public Criteria andBcIdEqualTo(Integer value) {
			addCriterion("bc_id =", value, "bcId");
			return (Criteria) this;
		}

		public Criteria andBcIdNotEqualTo(Integer value) {
			addCriterion("bc_id <>", value, "bcId");
			return (Criteria) this;
		}

		public Criteria andBcIdGreaterThan(Integer value) {
			addCriterion("bc_id >", value, "bcId");
			return (Criteria) this;
		}

		public Criteria andBcIdGreaterThanOrEqualTo(Integer value) {
			addCriterion("bc_id >=", value, "bcId");
			return (Criteria) this;
		}

		public Criteria andBcIdLessThan(Integer value) {
			addCriterion("bc_id <", value, "bcId");
			return (Criteria) this;
		}

		public Criteria andBcIdLessThanOrEqualTo(Integer value) {
			addCriterion("bc_id <=", value, "bcId");
			return (Criteria) this;
		}

		public Criteria andBcIdIn(List<Integer> values) {
			addCriterion("bc_id in", values, "bcId");
			return (Criteria) this;
		}

		public Criteria andBcIdNotIn(List<Integer> values) {
			addCriterion("bc_id not in", values, "bcId");
			return (Criteria) this;
		}

		public Criteria andBcIdBetween(Integer value1, Integer value2) {
			addCriterion("bc_id between", value1, value2, "bcId");
			return (Criteria) this;
		}

		public Criteria andBcIdNotBetween(Integer value1, Integer value2) {
			addCriterion("bc_id not between", value1, value2, "bcId");
			return (Criteria) this;
		}

		public Criteria andUIdIsNull() {
			addCriterion("u_id is null");
			return (Criteria) this;
		}

		public Criteria andUIdIsNotNull() {
			addCriterion("u_id is not null");
			return (Criteria) this;
		}

		public Criteria andUIdEqualTo(Integer value) {
			addCriterion("u_id =", value, "uId");
			return (Criteria) this;
		}

		public Criteria andUIdNotEqualTo(Integer value) {
			addCriterion("u_id <>", value, "uId");
			return (Criteria) this;
		}

		public Criteria andUIdGreaterThan(Integer value) {
			addCriterion("u_id >", value, "uId");
			return (Criteria) this;
		}

		public Criteria andUIdGreaterThanOrEqualTo(Integer value) {
			addCriterion("u_id >=", value, "uId");
			return (Criteria) this;
		}

		public Criteria andUIdLessThan(Integer value) {
			addCriterion("u_id <", value, "uId");
			return (Criteria) this;
		}

		public Criteria andUIdLessThanOrEqualTo(Integer value) {
			addCriterion("u_id <=", value, "uId");
			return (Criteria) this;
		}

		public Criteria andUIdIn(List<Integer> values) {
			addCriterion("u_id in", values, "uId");
			return (Criteria) this;
		}

		public Criteria andUIdNotIn(List<Integer> values) {
			addCriterion("u_id not in", values, "uId");
			return (Criteria) this;
		}

		public Criteria andUIdBetween(Integer value1, Integer value2) {
			addCriterion("u_id between", value1, value2, "uId");
			return (Criteria) this;
		}

		public Criteria andUIdNotBetween(Integer value1, Integer value2) {
			addCriterion("u_id not between", value1, value2, "uId");
			return (Criteria) this;
		}

		public Criteria andBIdIsNull() {
			addCriterion("b_id is null");
			return (Criteria) this;
		}

		public Criteria andBIdIsNotNull() {
			addCriterion("b_id is not null");
			return (Criteria) this;
		}

		public Criteria andBIdEqualTo(Integer value) {
			addCriterion("b_id =", value, "bId");
			return (Criteria) this;
		}

		public Criteria andBIdNotEqualTo(Integer value) {
			addCriterion("b_id <>", value, "bId");
			return (Criteria) this;
		}

		public Criteria andBIdGreaterThan(Integer value) {
			addCriterion("b_id >", value, "bId");
			return (Criteria) this;
		}

		public Criteria andBIdGreaterThanOrEqualTo(Integer value) {
			addCriterion("b_id >=", value, "bId");
			return (Criteria) this;
		}

		public Criteria andBIdLessThan(Integer value) {
			addCriterion("b_id <", value, "bId");
			return (Criteria) this;
		}

		public Criteria andBIdLessThanOrEqualTo(Integer value) {
			addCriterion("b_id <=", value, "bId");
			return (Criteria) this;
		}

		public Criteria andBIdIn(List<Integer> values) {
			addCriterion("b_id in", values, "bId");
			return (Criteria) this;
		}

		public Criteria andBIdNotIn(List<Integer> values) {
			addCriterion("b_id not in", values, "bId");
			return (Criteria) this;
		}

		public Criteria andBIdBetween(Integer value1, Integer value2) {
			addCriterion("b_id between", value1, value2, "bId");
			return (Criteria) this;
		}

		public Criteria andBIdNotBetween(Integer value1, Integer value2) {
			addCriterion("b_id not between", value1, value2, "bId");
			return (Criteria) this;
		}

		public Criteria andBDateIsNull() {
			addCriterion("b_date is null");
			return (Criteria) this;
		}

		public Criteria andBDateIsNotNull() {
			addCriterion("b_date is not null");
			return (Criteria) this;
		}

		public Criteria andBDateEqualTo(Date value) {
			addCriterionForJDBCDate("b_date =", value, "bDate");
			return (Criteria) this;
		}

		public Criteria andBDateNotEqualTo(Date value) {
			addCriterionForJDBCDate("b_date <>", value, "bDate");
			return (Criteria) this;
		}

		public Criteria andBDateGreaterThan(Date value) {
			addCriterionForJDBCDate("b_date >", value, "bDate");
			return (Criteria) this;
		}

		public Criteria andBDateGreaterThanOrEqualTo(Date value) {
			addCriterionForJDBCDate("b_date >=", value, "bDate");
			return (Criteria) this;
		}

		public Criteria andBDateLessThan(Date value) {
			addCriterionForJDBCDate("b_date <", value, "bDate");
			return (Criteria) this;
		}

		public Criteria andBDateLessThanOrEqualTo(Date value) {
			addCriterionForJDBCDate("b_date <=", value, "bDate");
			return (Criteria) this;
		}

		public Criteria andBDateIn(List<Date> values) {
			addCriterionForJDBCDate("b_date in", values, "bDate");
			return (Criteria) this;
		}

		public Criteria andBDateNotIn(List<Date> values) {
			addCriterionForJDBCDate("b_date not in", values, "bDate");
			return (Criteria) this;
		}

		public Criteria andBDateBetween(Date value1, Date value2) {
			addCriterionForJDBCDate("b_date between", value1, value2, "bDate");
			return (Criteria) this;
		}

		public Criteria andBDateNotBetween(Date value1, Date value2) {
			addCriterionForJDBCDate("b_date not between", value1, value2, "bDate");
			return (Criteria) this;
		}

		public Criteria andExpRDateIsNull() {
			addCriterion("exp_r_date is null");
			return (Criteria) this;
		}

		public Criteria andExpRDateIsNotNull() {
			addCriterion("exp_r_date is not null");
			return (Criteria) this;
		}

		public Criteria andExpRDateEqualTo(Date value) {
			addCriterionForJDBCDate("exp_r_date =", value, "expRDate");
			return (Criteria) this;
		}

		public Criteria andExpRDateNotEqualTo(Date value) {
			addCriterionForJDBCDate("exp_r_date <>", value, "expRDate");
			return (Criteria) this;
		}

		public Criteria andExpRDateGreaterThan(Date value) {
			addCriterionForJDBCDate("exp_r_date >", value, "expRDate");
			return (Criteria) this;
		}

		public Criteria andExpRDateGreaterThanOrEqualTo(Date value) {
			addCriterionForJDBCDate("exp_r_date >=", value, "expRDate");
			return (Criteria) this;
		}

		public Criteria andExpRDateLessThan(Date value) {
			addCriterionForJDBCDate("exp_r_date <", value, "expRDate");
			return (Criteria) this;
		}

		public Criteria andExpRDateLessThanOrEqualTo(Date value) {
			addCriterionForJDBCDate("exp_r_date <=", value, "expRDate");
			return (Criteria) this;
		}

		public Criteria andExpRDateIn(List<Date> values) {
			addCriterionForJDBCDate("exp_r_date in", values, "expRDate");
			return (Criteria) this;
		}

		public Criteria andExpRDateNotIn(List<Date> values) {
			addCriterionForJDBCDate("exp_r_date not in", values, "expRDate");
			return (Criteria) this;
		}

		public Criteria andExpRDateBetween(Date value1, Date value2) {
			addCriterionForJDBCDate("exp_r_date between", value1, value2, "expRDate");
			return (Criteria) this;
		}

		public Criteria andExpRDateNotBetween(Date value1, Date value2) {
			addCriterionForJDBCDate("exp_r_date not between", value1, value2, "expRDate");
			return (Criteria) this;
		}

		public Criteria andActRDateIsNull() {
			addCriterion("act_r_date is null");
			return (Criteria) this;
		}

		public Criteria andActRDateIsNotNull() {
			addCriterion("act_r_date is not null");
			return (Criteria) this;
		}

		public Criteria andActRDateEqualTo(Date value) {
			addCriterionForJDBCDate("act_r_date =", value, "actRDate");
			return (Criteria) this;
		}

		public Criteria andActRDateNotEqualTo(Date value) {
			addCriterionForJDBCDate("act_r_date <>", value, "actRDate");
			return (Criteria) this;
		}

		public Criteria andActRDateGreaterThan(Date value) {
			addCriterionForJDBCDate("act_r_date >", value, "actRDate");
			return (Criteria) this;
		}

		public Criteria andActRDateGreaterThanOrEqualTo(Date value) {
			addCriterionForJDBCDate("act_r_date >=", value, "actRDate");
			return (Criteria) this;
		}

		public Criteria andActRDateLessThan(Date value) {
			addCriterionForJDBCDate("act_r_date <", value, "actRDate");
			return (Criteria) this;
		}

		public Criteria andActRDateLessThanOrEqualTo(Date value) {
			addCriterionForJDBCDate("act_r_date <=", value, "actRDate");
			return (Criteria) this;
		}

		public Criteria andActRDateIn(List<Date> values) {
			addCriterionForJDBCDate("act_r_date in", values, "actRDate");
			return (Criteria) this;
		}

		public Criteria andActRDateNotIn(List<Date> values) {
			addCriterionForJDBCDate("act_r_date not in", values, "actRDate");
			return (Criteria) this;
		}

		public Criteria andActRDateBetween(Date value1, Date value2) {
			addCriterionForJDBCDate("act_r_date between", value1, value2, "actRDate");
			return (Criteria) this;
		}

		public Criteria andActRDateNotBetween(Date value1, Date value2) {
			addCriterionForJDBCDate("act_r_date not between", value1, value2, "actRDate");
			return (Criteria) this;
		}
	}

	public static class Criteria extends GeneratedCriteria {

		protected Criteria() {
			super();
		}
	}

	public static class Criterion {
		private String condition;

		private Object value;

		private Object secondValue;

		private boolean noValue;

		private boolean singleValue;

		private boolean betweenValue;

		private boolean listValue;

		private String typeHandler;

		public String getCondition() {
			return condition;
		}

		public Object getValue() {
			return value;
		}

		public Object getSecondValue() {
			return secondValue;
		}

		public boolean isNoValue() {
			return noValue;
		}

		public boolean isSingleValue() {
			return singleValue;
		}

		public boolean isBetweenValue() {
			return betweenValue;
		}

		public boolean isListValue() {
			return listValue;
		}

		public String getTypeHandler() {
			return typeHandler;
		}

		protected Criterion(String condition) {
			super();
			this.condition = condition;
			this.typeHandler = null;
			this.noValue = true;
		}

		protected Criterion(String condition, Object value, String typeHandler) {
			super();
			this.condition = condition;
			this.value = value;
			this.typeHandler = typeHandler;
			if (value instanceof List<?>) {
				this.listValue = true;
			} else {
				this.singleValue = true;
			}
		}

		protected Criterion(String condition, Object value) {
			this(condition, value, null);
		}

		protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
			super();
			this.condition = condition;
			this.value = value;
			this.secondValue = secondValue;
			this.typeHandler = typeHandler;
			this.betweenValue = true;
		}

		protected Criterion(String condition, Object value, Object secondValue) {
			this(condition, value, secondValue, null);
		}
	}
}